package org.acra.d;

import java.io.IOException;
import java.net.SocketTimeoutException;
import org.acra.ACRA;
import org.acra.c.a;
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.params.HttpConnectionParams;
import org.apache.http.params.HttpParams;
import org.apache.http.protocol.HttpContext;

class e
  implements HttpRequestRetryHandler
{
  private final HttpParams a;
  private final int b;

  private e(HttpParams paramHttpParams, int paramInt)
  {
    this.a = paramHttpParams;
    this.b = paramInt;
  }

  public boolean retryRequest(IOException paramIOException, int paramInt, HttpContext paramHttpContext)
  {
    if ((paramIOException instanceof SocketTimeoutException))
    {
      if (paramInt <= this.b)
      {
        if (this.a != null)
        {
          int i = 2 * HttpConnectionParams.getSoTimeout(this.a);
          HttpConnectionParams.setSoTimeout(this.a, i);
          ACRA.log.a(ACRA.LOG_TAG, "SocketTimeOut - increasing time out to " + i + " millis and trying again");
        }
        while (true)
        {
          return true;
          ACRA.log.a(ACRA.LOG_TAG, "SocketTimeOut - no HttpParams, cannot increase time out. Trying again with current settings");
        }
      }
      ACRA.log.a(ACRA.LOG_TAG, "SocketTimeOut but exceeded max number of retries : " + this.b);
    }
    return false;
  }
}

/* Location:           D:\Studium\Bachelorarbeit\BA Marcus Wobig\BA\BA\Decompiler\PicturePassword APK\Programm\PicturePassword_dex2jar.jar
 * Qualified Name:     org.acra.d.e
 * JD-Core Version:    0.6.2
 */